<form class="form-inline" method="get">
    <div class="col-xs-12">
        <button type="button" onclick="modal('{:url(\'addshopGoods\')}', '添加商品', '80%', '80%')" class="btn btn-success">
            添加矿机
        </button>
    </div>
</form>
<hr>

<table class="table table-striped table-bordered">
    <thead>
    <tr>
        <td>ID</td>
        <td>矿机图片</td>
        <td>矿机名称</td>
        <td>矿机价格</td>
        <td>周期和每日收益</td>
        <td>是否显示</td>
        <td>排序</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="item"}
    <tr>
        <td>{$item.id}</td>
        <td>
            <a href="{$item.img_url}" target="_blank"><img src="{$item.img_url}" style="width:50px;"></a>
        </td>
        <td>{$item.title}</td>
        <td>
            {$item.price} SCB
        </td>
        <td>
            <p>{$item.daynum}天*{$item.dayearn}SCB/天= <?php echo ($item['daynum']*$item['dayearn']); ?>SCB</p>
            <p>每人可购买 {$item.buynum} 次</p>
        </td>
        <td>
            {if $item["isshow"] eq 1}
            <label class="label label-success">显示</label>
            {else}
            <label class="label label-danger">隐藏</label>
            {/if}
        </td>
        <td>{$item.sort}</td>
        <td>
                <a href="javascript:;" onclick="modal('{:url(\'editshopGoods\', [\'id\'=>$item.id])}', '编辑商品', '80%', '80%')" class="btn btn-default">
                    编辑
                </a>
                <!-- <a href="javascript:;" data-toggle="confirm" data-title="确定删除此记录？" data-url="{:url('Shop/delshopGoods', ['id'=>$item.id])}" class="btn btn-default">
                    删除
                </a> -->
        </td>
    </tr>
    {/volist}
    </tbody>
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$list->render()}
    </div>
</div>
